﻿@model IEnumerable<CNRegex.Entity.MyTestView>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<script type="text/javascript">

	$(
		function () {
			$("form").submit(
				function (eventObject) {
					debugger;
					return false;
				}
			);
		}
	);

		function testClick() {
			$("form").submit({ gg: "gg" }, function (eventObject) {
				debugger;
			});
		}
	

</script>

@using (Html.BeginForm())
{
	<table>
		<tr>
			<td>
				Title:
			</td>
			<td>
				@Html.TextBox("_Title")
			</td>
			<td>
				CreateDate:
			</td>
			<td>
				@Html.TextBox("_CreateDate")
			</td>
			<td>
				<input type="submit" value="Submit" id="button1" />
				<input type="submit" value="Submit" id="button2" />
				<input type="button" value="test" onclick="testClick();" />
			</td>
		</tr>
	</table>
}


<table>
    <tr>
        <th></th>
        <th>
            Title
        </th>
        <th>
            Summery
        </th>
        <th>
            CreateDate
        </th>
        <th>
            UserID
        </th>
        <th>
            CatalogID
        </th>
        <th>
            ClickCount
        </th>
        <th>
            Recommend
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
        <td>
            @item.Title
        </td>
        <td>
            @item.Summery
        </td>
        <td>
            @String.Format("{0:g}", item.CreateDate)
        </td>
        <td>
            @item.UserID
        </td>
        <td>
            @item.CatalogID
        </td>
        <td>
            @item.ClickCount
        </td>
        <td>
            @item.Recommend
        </td>
    </tr>
}

</table>

